package com.bianxingji.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bianxingji.constant.FileType;
import com.bianxingji.mapper.BxjSysFilesMapper;
import com.bianxingji.po.BxjSysFiles;
import com.bianxingji.service.BxjSysFilesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wy
 */
@Slf4j
@Service
public class BxjSysFilesServiceImpl extends ServiceImpl<BxjSysFilesMapper, BxjSysFiles> implements BxjSysFilesService {

    @Autowired
    private BxjSysFilesMapper bxjSysFilesMapper;

    @Override
    public List<BxjSysFiles> getBannerList() {
        /*获取文件类型为首页轮播图的*/
        LambdaQueryWrapper<BxjSysFiles> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(BxjSysFiles::getFileType, FileType.BXJ_MOVIE_BANNER_PICTURES);
        List<BxjSysFiles> bxjSysFiles = bxjSysFilesMapper.selectList(queryWrapper);
        return bxjSysFilesMapper.selectList(queryWrapper);
    }
}
